﻿@{
    Layout = null;
}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>查询</title>
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/kendo/2014.1.318/kendo.common.min.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/kendo/2014.1.318/kendo.dataviz.min.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/kendo/2014.1.318/kendo.default.min.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/kendo/2014.1.318/kendo.dataviz.default.min.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/kendo/2014.1.318/jquery.min.js")"></script>
    <script src="@Url.Content("~/Scripts/kendo/2014.1.318/kendo.all.min.js")"></script>
    <script src="@Url.Content("~/Scripts/kendo/2014.1.318/kendo.aspnetmvc.min.js")"></script>
    <script src="@Url.Content("~/Scripts/kendo.modernizr.custom.js")"></script>
    <style type="text/css">
        *
        {
            margin: 0;
            padding: 0;
            border: 0;
            font-family: microsoft yaHei;
        }
        body, html
        {
            height: 100%;
        }
        .search_blcok
        {
            width: 584px;
            min-height: 99%;
            border: 1px solid #fff;
            background: #fff;
            border-radius: 3px;
            margin: 0 auto;
        }
        
        .serch_info
        {
            padding: 10px 20px;
            vertical-align: middle;
            position: fixed;
            top: 0;
            z-index: 10;
            background: #fff;
        }
        
        .input_txt
        {
            width: 290px;
            padding: 0 5px;
            height: 38px;
            line-height: 38px;
            border: 2px solid #0096db;
            border-radius: 5px;
            font-size: 18px;
            color: #b1b1b1;
        }
        
        .search_btn
        {
            width: 103px;
            height: 42px;
            border: 2px solid #0096db;
            border-radius: 5px 0 0 5px;
            font-size: 18px;
            background: 0;
            color: #0096db;
            font-weight: bold;
            margin-left: 20px;
            cursor: pointer;
            background: #fff;
        }
        
        .search_del
        {
            width: 103px;
            height: 42px;
            border: 2px solid #0096db;
            border-radius: 0px 5px 5px 0;
            font-size: 18px;
            background: 0;
            color: #0096db;
            font-weight: bold;
            cursor: pointer;
            background: #fff;
            margin-left: -6px;
        }
        
        #result
        {
            margin-top: 70px;
        }
        
        .result_block
        {
            width: 504px;
            margin: 0 auto 20px auto;
            background: #eaf5fa;
            border-radius: 5px;
            min-height: 20px;
            padding: 20px;
            line-height: 24px;
        }
        
        .result_block table
        {
            width: 504px;
        }
        
        .td_l
        {
            color: #0096db;
            text-align: right;
            width: 120px;
            padding-right: 10px;
            vertical-align: top;
        }
        
        .td_r
        {
            color: #123b4d;
            width: 374px;
            word-break: break-all;
        }
        .btn-queding
        {
            border: none;
            display: inline-block;
            border: none;
            width: 67px;
            height: 21px;
            background-image: url('../images/queding.jpg');
            margin: 0 5px;
            cursor: pointer;
        }
        .btn-quxiao
        {
            border: none;
            display: inline-block;
            border: none;
            width: 67px;
            height: 21px;
            background-image: url('../images/quxiao.jpg');
            margin: 0 5px;
            cursor: pointer;
        }
        .check_attend
        {
            border-radius: 1px;
            padding: 3px 10px;
            background: #0096db;
            color: #fff;
            border: 1px solid #fff;
            margin-left: 30px;
        }
        .btn-queding
        {
            position: absolute;
            bottom: 10px;
            right: 80px;
        }
        .btn-quxiao
        {
            position: absolute;
            bottom: 10px;
            right: 10px;
        }
        .k-datetimepicker .k-picker-wrap .k-icon
        {
            margin: 4px 2px 0 2px;
        }
    </style>
</head>
<body>
    <div class="search_blcok">
        <div class="serch_info">
            <input class="input_txt" value="请输入查询条件" />
            <button class="search_btn" onclick="flash()">
                查询
            </button>
            <button class="search_del">
                清除
            </button>
        </div>
        <div id="result">
        </div>
    </div>
    @(Html.Kendo().Window().Title("确认参会")
        .Name("confirmWindow")
    .Content(@<text><div class="dialogue-confirmWindow">
        <div class="confirmWindow-wrapper">
            @Html.Hidden("hParticipantID")
            参会时间：@Html.Kendo().DateTimePicker().Name("dtArrivalDateTime")
        </div>
        <div class="dialogue-buttons" style="float: right;">
            <input type="button" class="btn-queding" onclick="OkConfirm()" />
            <input type="button" class="btn-quxiao" onclick="$('#confirmWindow').data('kendoWindow').close();" />
        </div>
    </div></text>)
    .Width(300).Height(200).Draggable(true).Modal(true).Visible(false))
    <script type="text/javascript">
        $(document).ready(function (e) {
            $(".search_del").click(function (e) {
                $(".input_txt").val("请输入查询条件");
                $(".input_txt").css("color", "#b1b1b1");
            });
            $(".input_txt").focus(function (e) {
                var obg_txt = $(this).val();
                if (obg_txt == "请输入查询条件") {
                    $(this).val("");
                    $(this).css("color", "#333");
                }
            });
            $(".input_txt").blur(function (e) {
                var obg_txt = $(this).val();
                if (obg_txt == "") {
                    $(".input_txt").val("请输入查询条件");
                    $(this).css("color", "#b1b1b1");
                }
            });
        });

        function flash() {
            if ($(".input_txt").val() != "请输入查询条件") {
                $.ajax({
                    url: 'Participant/Search',
                    type: 'GET',
                    dataType: 'html',
                    contentType: 'application/json; charset=utf-8',
                    data: { where: $(".input_txt").val() },
                    success: function (result) {
                        $('#result').html(result);
                    },
                    error: function (xhr, status) {
                        alert(xhr.responseText);
                    }
                });
            }
        }

        function windowOpen(e) {
            $("#hParticipantID").val(e);
            $('#confirmWindow').data('kendoWindow').center().open();
            $("#dtArrivalDateTime").data("kendoDateTimePicker").value(new Date());
        }
        function OkConfirm() {
            $.ajax({
                url: 'Participant/Confirm',
                type: 'GET',
                dataType: 'html',
                contentType: 'application/json; charset=utf-8',
                data: { ParticipantID: $("#hParticipantID").val(), ArrivalDateTime: $("#dtArrivalDateTime").val() },
                success: function (result) {
                    $('#confirmWindow').data('kendoWindow').close();
                    flash();
                },
                error: function (xhr, status) {
                    alert(xhr.responseText);
                }
            });
        }
    </script>
</body>
</html>
